In a virtualization technology, a virtual layer is added between software and hardware to virtualize a physical machine (PM) at a bottom layer into multiple virtual machines (VM), and all virtual machines are centrally scheduled using the virtual layer to implement multiplexing of the physical machine. Virtual machine migration is a main feature of the virtualization technology. The virtual machine migration refers to that a virtual machine of two or more physical hosts is migrated between the physical hosts, that is, an operating system and memory data of the virtual machine, and a status of the virtual machine are transferred in a case of ensuring that an application is not interrupted, which features zero downtime, and can ensure full utilization of hardware resources on different physical platforms and improve the operating efficiency of a system.
Current migration processing of a virtual machine is generally considered from a hardware (for example, a memory or a network) perspective. For example, there is a double-machine application A. In an original situation, a master machine and a slave machine of the double-machine application A run on a VM A and a VM B respectively, and the VM A and the VM B run on a physical machine PM A and a physical machine PM B respectively. When the PM A is abnormal, an active/standby mechanism is enabled, and the VM A running on the PM A is migrated to the PM B by means of a virtual machine migration operation. In this case, both the VM A and the VM B run on the PM B. If the PM B becomes abnormal, the active/standby mechanism cannot be enabled, which reduces reliability of the application. Similarly, when the application is a cluster application, a similar problem also exists. If multiple VMs in a same cluster exist on one PM after migration is performed, the reliability of the application is also reduced. Therefore, it is necessary to provide a new method to resolve the foregoing problem.